package com.sljy.hzk.room.dao;

import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;

import java.util.List;

/**
 * Created  on 2018/4/8
 *
 * @author 唐开阔
 * @describe
 */
public interface BaseDao<T> {


    /**
     * 插入一系类数据
     * @param dlskEntities
     */
    @Insert
    void insertAll(List<T> dlskEntities);

    /**
     * 添加一个数据
     * @param dlskEntity
     */
    @Insert
    void insert(T dlskEntity);

    /**
     * 删除一个数据
     * @param dlskEntity
     */
    @Delete
    void delete(T dlskEntity);

    /**
     * 删除一个数据
     */
    @Delete
    void deleteAll(List<T> dlskEntities);
}
